<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Web base</title>
</head>

<script type="text/javascript">
	function modifySub(subId) {
	  window.location = "${ctx}/title/titleSub!preModify.action?titleSub.subId="+subId;
	}

	function deleteSub(subId) {
	  if(window.confirm('确定要删除该栏目节点吗?')) {
	  		window.location = "${ctx}/title/titleSub_delete.action?titleSub.subId="+subId;
	  }  
	}

	function addSub(actionValue) {
		document.sub.action=actionValue ;		
		document.sub.submit() ;
				
	}
	
	function nextSub(actionValue, subId) {
		document.sub.action=actionValue ;
		document.getElementById("titleSub.subId").value=subId ;
		
		document.sub.submit() ;
				
	}

</script>

<link href="${ctx}/css/main/base.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/css/main/main.css" rel="stylesheet" type="text/css" />
<body>
<form name="sub" action="" method="post" >

<input type="hidden" name="title.titleId" value="${title.titleId }" />
<input type="hidden" name="titleSub.subId" value="${titleSub.subId }" />
<input type="hidden" name="titleCode" value="${titleCode}" />
<input type="hidden" name="titleName" value="${titleName}" />


<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab_m left">

  <tr>
    <td colspan="2" class="zctop"><span class="font14 zc_bt">子栏目项设置</span></td>
  </tr>
    
    <tr>
	    <td colspan="2" class="w1">
	    <div class="cd_img" style="float:left;"><strong>上级栏目：${titleName} </strong></div>        
        <div style="float:right; margin-right:75px;" >
        
        <c:if test="${(fn:length(titleCode))!=2}">       
        <a href="javascript:history.back()" target="mright">返回上一级</a> 	
        </c:if>
           
	    </div>
	    </td>
    </tr>	
    
  <s:iterator value="titleSubs" status="titleSub" id="titleSub1">
	  <tr>
	    <td class="w1">
	    <div class="cd_img"><img src="${ctx}/images/menu/data.gif"/></div>
	    <s:property value="titleCodeGroup"/><s:property value="subName"/> 
	    </td>
	    <td width="30%">
	    <span onclick=" modifySub('${subId}');" style="cursor: pointer;"> 编辑</span>
        <a href="javascript:nextSub('${ctx}/title/titleSub_manageSub.action', '${subId}' )" target="mright">下一级</a> 
	    <span onclick=" deleteSub('${subId}');" style="cursor: pointer;">删除</span>
	    </td>
	  </tr>			
  </s:iterator>
    </tr>
     <tr>
    <td colspan="2" class="zd_z center">
    <a href="javascript: addSub( '${ctx}/title/titleSub!preCreate.action' )" target="mright"><img src="${ctx}/images/main/zd_z.gif" /></a></td>
    </tr>
</table>

</form>
</body>
</html>
